Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Increase code coverage (pt2). #389

Merged
merged 1 commit into from
Sep 13, 2024
Merged

Conversation

Laimiux
Copy link
Collaborator

@Laimiux Laimiux commented Sep 12, 2024

No description provided.

@@ -76,38 +75,27 @@ internal class ChildrenManager(
)
}

if (key is IndexedKey) {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removing this as this will never happen

@Laimiux Laimiux force-pushed the laimonas/increase-code-coverage-pt2 branch from 6ccdd76 to 6e2e633 Compare September 12, 2024 18:32
@carrotkite
Copy link

carrotkite commented Sep 12, 2024

JaCoCo Code Coverage 96.44% ✅

Class Covered Meta Status
com/instacart/formula/internal/Listeners 100% 0%
com/instacart/formula/internal/SnapshotImpl 93% 0%
com/instacart/formula/internal/ChildrenManager 100% 0%
com/instacart/formula/internal/SingleRequestHolder 100% 0%
com/instacart/formula/internal/ListenerImpl 83% 0%
com/instacart/formula/Renderer 100% 0%
com/instacart/formula/test/RxJavaFormulaTestDelegate 100% 0%

Generated by 🚫 Danger

@Laimiux Laimiux force-pushed the laimonas/increase-code-coverage-pt2 branch 3 times, most recently from 24a74ed to 43329d8 Compare September 12, 2024 19:37
@@ -12,7 +11,7 @@ internal class ChildrenManager(
private val delegate: FormulaManagerImpl<*, *, *>,
private val inspector: Inspector?,
) {
private var children: SingleRequestMap<Any, FormulaManager<*, *>>? = null
private val children: SingleRequestMap<Any, FormulaManager<*, *>> = LinkedHashMap()
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need to optimize children map initialization as FormulaManager optimizes this already

fun <Input, State, Event> initOrFindListener(key: Any, useIndex: Boolean): ListenerImpl<Input, State, Event> {
val currentHolder = listenerHolder<Input, State, Event>(key)
return if (currentHolder.requested && useIndex) {
if (key is IndexedKey) {
Copy link
Collaborator Author

@Laimiux Laimiux Sep 12, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This won't happen so no need to check

@Laimiux Laimiux force-pushed the laimonas/increase-code-coverage-pt2 branch from 43329d8 to fdd87cf Compare September 12, 2024 19:55
@Laimiux Laimiux requested a review from deesonpatel September 12, 2024 20:03
@Laimiux Laimiux merged commit 3bd75d2 into master Sep 13, 2024
4 checks passed
@Laimiux Laimiux deleted the laimonas/increase-code-coverage-pt2 branch September 13, 2024 13:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants